#include <57header.h>

void *func(void *p){

    printf("son \n");
    return NULL;
}
int main(int argc,char*argv[])
{
    pthread_attr_t attr;
    pthread_attr_init(&attr);
    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);

    pthread_t tid;
    pthread_create(&tid,&attr, func, NULL);

    int res = pthread_join(tid, NULL);
    THREAD_ERROR_CHECK(res, "join");

    pthread_attr_destroy(&attr);


    return 0;
}

